package com.lispiron.training.scclient.web;

import com.lispiron.training.scclient.service.HelloService;
import com.lispiron.training.scclient.service.feign.FeignHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author QiYao
 * @date 2018/2/6
 */
@RestController
public class IndexController {


    @Autowired
    public FeignHelloService feignHelloService;

    @Autowired
    public HelloService helloService;

    @RequestMapping("/index")
    public String hello(){
        return helloService.hello();
    }

    @RequestMapping("/index2")
    public String hello2(){
        return feignHelloService.hello();
    }
}
